<template>
    <div class="content">
        <img class="hd-img-responsive" src="https://skv4.oss-cn-hangzhou.aliyuncs.com/app/skv4/common1568880967000/%E6%8A%95%E8%AF%89%E5%BB%BA%E8%AE%AE.png"/>
        <p class="title">提报信息</p>
        <van-cell-group>
            <van-cell class="top-item" :title="title"/>
            <van-cell class="top-item" :title="content"/>
            <van-cell class="top-item" :title="create_on"/>
        </van-cell-group>
        <p class="title">流程信息</p>
        <div v-for="(item, index) in flowlist" :key="index">
            <van-panel :title="item.dep_name" :desc="item.start_on+' ~ '+item.end_on" :status="item.state"></van-panel>
        </div>
    </div>
</template>

<script>
import { CitizenCardPubDetail } from '@/api/mine'
// import { Toast, Dialog } from 'vant'
export default {
  name: 'index',
  data () {
    return {
      title: '',
      create_on: '',
      content: '',
      flowlist: []
    }
  },
  methods: {
    init () {
      let data = {
        xin_id: this.$route.params.xin_id,
        card_id: this.$route.params.card_id
      }
      CitizenCardPubDetail(data).then(ret => {
        console.log(ret.data.data.xin.title)
        this.title = ret.data.data.xin.title
        this.content = ret.data.data.xin.content
        this.create_on = '提交时间 : ' + ret.data.data.xin.create_on
        this.flowlist = ret.data.data.flow
      })
    }
  },
  mounted () {
    this.init()
  }
}
</script>

<style scoped>
    .content{
        width: 100%;
        height: 100%;
        background-color: #F5F5F5;
    }
    .top-item .van-cell__title, .van-cell__value {
         -webkit-box-flex: inherit;
         -webkit-flex:inherit;
         flex: inherit;
    }
    .title{
        width: 100%;
        padding: 0 0.9375rem;
        color: #9d9d9d;
        font-size: 0.875rem;
    }
</style>
